package com.tma.timesheettracker.model;

import java.util.List;

public class ListTrackingEntry {
	private int m_duration;
	private List<TrackingEntry> m_lstTraking;
	private TrackingEntry m_entry;
	
	public ListTrackingEntry(List<TrackingEntry> lstTracking,boolean isTask,int TaskID) {
		this.m_lstTraking = lstTracking;
		for(TrackingEntry entry :m_lstTraking) {
			m_duration+=entry.getDuration();
			if(isTask){
				if(entry.getTask_id()==TaskID) {
					m_entry=entry;
				}
			}
		}
	}

	public int getM_duration() {
		return m_duration;
	}

	public void setM_duration(int m_duration) {
		this.m_duration = m_duration;
	}

	public List<TrackingEntry> getM_lstTraking() {
		return m_lstTraking;
	}

	public void setM_lstTraking(List<TrackingEntry> m_lstTraking) {
		this.m_lstTraking = m_lstTraking;
	}

	public TrackingEntry getM_entry() {
		return m_entry;
	}

	public void setM_entry(TrackingEntry m_entry) {
		this.m_entry = m_entry;
	}
	

}
